* Put together Figures 8 (left panel) and 9
* Use F8_ngf.csv, F8_global.csv, F9_ngf.csv, F9_global.csv

* Figure 8:
clear
insheet using "QuantitativeModel/temp/F8_ngf.csv" 
rename si si_Unc
rename growth growth_Unc
gen id=_n
save "QuantitativeModel/temp/temp.dta", replace

clear
insheet using "QuantitativeModel/temp/F8_global.csv"
gen id=_n
merge 1:1 id using "QuantitativeModel/temp/temp.dta"

label var si "Importing"
label var si_Unc "No Global Firms"
label var growth "Importing"
label var growth_Unc "No Global Firms"

twoway (scatter growth si, mcolor(navy)) (scatter growth_Unc si_Unc, mcolor(red) m(T)) , graphregion(fcolor(white)) legend(on)  xtitle(sI) ytitle(AP)  xtitle(Initial Import Share) ytitle(Market Share Growth) graphregion(color(white))
graph export "Output/F8_A.pdf", replace

* Figure 9:

clear
insheet using "QuantitativeModel/temp/F9_ngf.csv"
rename sx sx_Unc
rename sdgrowth sdgrowth_Unc
gen id=_n
save "QuantitativeModel/temp/temp.dta", replace

clear
insheet using "QuantitativeModel/temp/F9_global.csv"
gen id=_n
merge 1:1 id using "QuantitativeModel/temp/temp.dta"

label var sx "Baseline"
label var sx_Unc "No Global Firms"
label var sdgrowth "Baseline"
label var sdgrowth_Unc "No Global Firms"

twoway (scatter sdgrowth sx, mcolor(black)) (scatter sdgrowth_Unc sx_Unc, mcolor(red) m(T)) , graphregion(fcolor(white)) legend(on)  xtitle(sI) ytitle(AP)  xtitle(Initial Export Share) ytitle(Domestic Share Growth) graphregion(color(white))
graph export "Output/F9.pdf", replace
